import {
    createRouter,
    createWebHashHistory
} from 'vue-router'

export const routes = [
    // 初始化重定向
    {
        path: '',
        name: 'layout',
        redirect: '/editor',
    },
    // 登录
    {
        path: '/editor',
        name: 'editor',
        component: () => import('@/views/modules/IEditor'),
        meta: {noRequireAuth: true}
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})
// 当想要在非Vue的应用中调用时，通过$router
window.$router = router
export default router
